package com.qf.service;

import com.qf.bean.Student;
import com.qf.dao.StudentDao;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.PageRequest;
import org.springframework.stereotype.Service;

/**
 * 2019/12/3
 * Administrator
 * sss1203
 * 面向对象面向君  不负代码不负卿
 */
@Service
public class StudentServiceImpl implements  StudentService {

    @Autowired
    private StudentDao studentDao;
    @Override
    public Page<Student> findstudents(int pageindex, int pageSize) {
        return studentDao.findAll(new PageRequest(pageindex-1,pageSize));
    }
}
